/**
 * help通用帮助js
 * @constructor
 */
function Help() {
}
//根据字段进行分组
Help.groupBy = function (array, f) {
    var groups = {};
    if (!array) {
    } else {
        array.forEach(function (o) {
            var group = JSON.stringify(f(o));
            groups[group] = groups[group] || [];
            groups[group].push(o);
        });
        return Object.keys(groups).map(function (group) {
            return groups[group];
        });
    }
};
Help.alertSuccMessage = function (title, message) {
    toastr.success(message, title);
};
Help.alertInfoMessage = function (title, message) {
    toastr.info(message, title);
};
Help.alertWarnMessage = function (title, message) {
    toastr.warn(message, title);
};
Help.alertErrorMessage = function (title, message) {
    toastr.error(message, title);
};